﻿@inherits AdminCompontentBase

<SAutoComplete Small 
               TValue="Guid"
               TItem="MessageTaskReceiverDto"
               TItemValue="Guid"
               OnSearchInputUpdate=OnSearchChanged
               Items="Items"
               Color="primary"
               Label="@T("Search")"
               ItemText="u=>TextView(u)"
               ItemValue="u=>u.SubjectId"
               Filter="(item,search,value) => true"
               Flat
               Dense
               Solo
               BackgroundColor="fill-background"
               HideDetails="@("auto")"
               HideSelected="false"
               Class="@($"{Class} rounded-2")"
               OnSelectedItemUpdate="HandleOnSelectedItemUpdate">
    <PrependInnerContent>
        <SIcon Size=16 Class="mr-2 default-lighten-1--text" IsDefaultToolTip="false">mdi-magnify</SIcon>
    </PrependInnerContent>
    <ItemContent Context="data">
        @RenderFragments.UserSelectItem(data.Item.Avatar, data.Item.DisplayName, T($"DisplayName.MessageTaskReceiverTypes.{data.Item.Type}"), data.Item.PhoneNumber, data.Item.Email)
    </ItemContent>
</SAutoComplete>